#!/usr/bin/env python
# -*- coding: utf-8 -*-
#coding=utf8

# 本文件由自动工具 proto.py 自动生成，请勿修改
# filename msg15000_csbuf.py
# package ptl

from ptl.base_csbuf import *


# message Req15001
class Req15001:
	def __init__(self):
		self.protoid = 15001
		pass

	def Marshal(writer):
		pass

	def Unmarshal( reader):
		pass
# message Resp15001
class Resp15001:
	def __init__(self):
		self.protoid = 15001
		self.equips = []

	def Marshal(writer):
		countequips = len(self.equips)
		writer.setArray(countequips, 1)
		for i in range(countequips):
			writer.setMessage(0)
			self.equips[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = EquipInfo() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.equips.append(msg)
# message Req15002
class Req15002:
	def __init__(self):
		self.protoid = 15002
		self.equipId = 0

	def Marshal(writer):
		writer.setUint8(self.equipId, 1)

	def Unmarshal( reader):
		self.equipId = reader.getUint8(1)
# message Resp15002
class Resp15002:
	def __init__(self):
		self.protoid = 15002
		self.status = 0
		self.equip = EquipInfo()

	def Marshal(writer):
		writer.setUint8(self.status, 1)
		writer.setMessage(2)
		self.equip.Marshal(writer)
		writer.endSetMessage()

	def Unmarshal( reader):
		self.status = reader.getUint8(1)
		reader.getMessage(2)
		self.equip.Unmarshal(reader)
		reader.endGetMessage()
# message Req15003
class Req15003:
	def __init__(self):
		self.protoid = 15003
		self.dirId = 0

	def Marshal(writer):
		writer.setUint64(self.dirId, 1)

	def Unmarshal( reader):
		self.dirId = reader.getUint64(1)
# message Resp15003
class Resp15003:
	def __init__(self):
		self.protoid = 15003
		self.status = 0

	def Marshal(writer):
		writer.setUint8(self.status, 1)

	def Unmarshal( reader):
		self.status = reader.getUint8(1)
# message Req15004
class Req15004:
	def __init__(self):
		self.protoid = 15004
		self.equipId = 0
		self.goodsId = 0
		self.type = 0

	def Marshal(writer):
		writer.setUint64(self.equipId, 1)
		writer.setUint64(self.goodsId, 2)
		writer.setUint8(self.type, 3)

	def Unmarshal( reader):
		self.equipId = reader.getUint64(1)
		self.goodsId = reader.getUint64(2)
		self.type = reader.getUint8(3)
# message Resp15004
class Resp15004:
	def __init__(self):
		self.protoid = 15004
		self.status = 0
		self.equip = EquipInfo()

	def Marshal(writer):
		writer.setUint8(self.status, 1)
		writer.setMessage(2)
		self.equip.Marshal(writer)
		writer.endSetMessage()

	def Unmarshal( reader):
		self.status = reader.getUint8(1)
		reader.getMessage(2)
		self.equip.Unmarshal(reader)
		reader.endGetMessage()
